Read the full startup error trace — NestJS indicates which module or provider index is undefined. Enable verbose logging to see the instantiation order. Use NestJS Devtools for a visual dependency graph. Static analysis tools like dependency-cruiser or eslint-plugin-boundaries can catch cycles before runtime.
Read the full error stack — the index number in the error points to the problematic import in your module's imports array.
Enable verbose NestJS logging to see the module initialization sequence.
Use @nestjs/devtools-integration for a visual graph of module and provider dependencies.
Use dependency-cruiser or eslint-plugin-boundaries to enforce architectural rules and catch cycles statically.
Search your codebase for forwardRef() occurrences — each one is a known cycle that should be documented or fixed.